import unittest


class DemoTestCase1(unittest.TestCase):
    def test001(self):
        print('test1')

    def test002(self):
        print('test2')


class DemoTestCase2(unittest.TestCase):
    def testaaa(self):
        print('testa')

    def testaab(self):
        print('testb')


if __name__ == '__main__':
    # suite 测试套件
    # addTests
    # 创建suite对象

    suite = unittest.TestSuite()
    test = [

        DemoTestCase1('test001'),
        DemoTestCase2('testaaa'),
        DemoTestCase2('testaab')

    ]

    suite.addTests(test)
    # 创建runner
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(suite)